<script setup lang="ts">
import { ElConfigProvider } from 'element-plus'
import zh from 'element-plus/es/locale/lang/zh-cn'
import { useGlobalStore } from '@/stores'

const globalStore = useGlobalStore()
provide('appTitle', import.meta.env.VITE_APP_TITLE)
provide('tableTextAlign', globalStore.tableTextAlign)
provide('cellStyle', { textAlign: 'center', padding: '8px 0', color: '#505050' })
provide('headerCellStyle', { textAlign: 'center', padding: '8px 0', color: '#505050' })
const buttonConfig = reactive({ autoInsertSpace: false })
</script>

<template>
  <ElConfigProvider :locale="zh" :button="buttonConfig" size="small">
    <router-view />
  </ElConfigProvider>
</template>
